import request from '@/utils/request'
import type { OpenDailyReqDto, OpenPayWageReqDto, OpenPeriodReqDto } from './types'
import type { PageDto, PagesDto, PageReqDto } from '../types'

/**
 * 开通发薪账户
 * @param data 
 * @returns 
 */
export function openPaywage(data: OpenPayWageReqDto): Promise<void> {
    return request.put('/crm-prod/saas/company/product/manage/openPaySalary', data)
}

/**
 * 开通长期保
 * @param data 
 * @returns 
 */
export function openPeriodInsurance(data: OpenPeriodReqDto): Promise<void> {
    return request.put('/crm-prod/saas/company/product/manage/openPeriodInsure', data)
}


/**
 * 开通日日保
 * @param data 
 * @returns 
 */
export function openDailyInsurance(data: OpenDailyReqDto): Promise<void> {
    return request.put('/crm-prod/saas/company/product/manage/openDailyInsure', data)
}

/**
 * 关闭产品
 * @param data 
 * @returns 
 */
export function closeProduct(data: {
    companyId: number
    isOpenWesure: number
    isOpenPaySalary: number
    isOpenEleSign: number
}): Promise<void> {
    return request.put('/crm-prod/saas/company/product/manage/closeProduct', data)
}
